package com.mineplatform.mapper;

import java.util.ArrayList;
import java.util.List;

import com.mineplatform.domain.M_MineCategory;

import com.mineplatform.dto.rep.MineCategoriesItemRep;


public class MineCategoriesItemRepMapper {


	
	public static List<MineCategoriesItemRep> parse(List<M_MineCategory> categories) {


		List<MineCategoriesItemRep> list = new ArrayList<MineCategoriesItemRep>();

		for (M_MineCategory category : categories) {

			MineCategoriesItemRep rep = new MineCategoriesItemRep();

			rep.setCategoryid(category.getId());
			rep.setImgpath(category.getCategoryPicture());
			rep.setName(category.getCategoryTitle());
			rep.setOrder(category.getCategoryPriority());

			list.add(rep);

		}

		return list;
	}
}
